<?php
/*
#mysql命令 
 
start： 
/etc/init.d/mysqld start 
 
stop： 
/etc/init.d/mysqld stop 
 
restart： 
/etc/init.d/mysqld restart 

mysql -u USERNAME -p
CREATE USER yy IDENTIFIED BY '123';
CREATE USER yy@localhost IDENTIFIED BY '123';
GRANT ALL PRIVILEGES ON *.* TO user;@localhost
grant select,insert,update,delete on *.* to test1@"%" Identified by "abc";

grant   all   privileges   on   pureftpd.*   to   koko@localhost   identified   by   'mimi';  



./mysqladmin -uroot -p1234.com status
Uptime: 1370150  Threads: 1 （当前连接数） Questions: 79  Slow queries: 0  Opens: 33  Flush tables: 1  Open tables: 26  Queries per second avg: 0.000

./mysql -uroot -p1234.com -e 'show status' | grep -i  Threads 
Delayed_insert_threads    0
Slow_launch_threads    0
Threads_cached    1
Threads_connected    1
Threads_created    2
Threads_running    1 ##（当前连接数）

mysql> show status like 'Threads%';
+-------------------+-------+
| Variable_name    | Value |
+-------------------+-------+
| Threads_cached    | 1    |
| Threads_connected | 1    |
| Threads_created  | 2    |
| Threads_running  | 1    |   ###当前连接数
+-------------------+-------+
rows in set (0.00 sec)


查看最大连接数
[root@xxx bin]# ./mysql -uroot -p1234.com -e 'show variables' | grep max_connections
max_connections    500

mysql> show global variables like 'max_conn%';

 show table status like 'customer';  

*/
?>